import Vue from 'vue'
import VueRouter from 'vue-router'
import ShopDingdan from '../components/SiyunDingdan/ShopDingdan'
import CkDingdan from '../components/SiyunDingdan/CkDingdan'
import XgDingdan from '../components/SiyunDingdan/XgDingdan'
import GzDingdan from '../components/SiyunDingdan/GzDingdan'
import Dfukuan from '../components/SiyunDingdan/ShopDingdan/Dfukuan'
import Dfahuo from '../components/SiyunDingdan/ShopDingdan/Dfahuo'
import Yfahuo from '../components/SiyunDingdan/ShopDingdan/Yfahuo'
import Yquxiao from '../components/SiyunDingdan/ShopDingdan/Yquxiao'
import Ywancheng from '../components/SiyunDingdan/ShopDingdan/Ywancheng'
import CourseDingdan from '../components/SiyunDingdan/CourseDingdan/CourseDingdan'
import CourseDfukuan from '../components/SiyunDingdan/CourseDingdan/CourseDfukuan'
import CourseYquxiao from '../components/SiyunDingdan/CourseDingdan/CourseYquxiao'
import CourseYwancheng from '../components/SiyunDingdan/CourseDingdan/CourseYwancheng'
import TuihuoDingdan from '../components/SiyunDingdan/TuihuoDingdan/TuihuoDingdan'
import CkTuihuoDingdan from '../components/SiyunDingdan/TuihuoDingdan/CkTuihuoDingdan'
import ZhongTuihuoDingdan from '../components/SiyunDingdan/TuihuoDingdan/ZhongTuihuoDingdan'
import DchuliTuihuoDingdan from '../components/SiyunDingdan/TuihuoDingdan/DchuliTuihuoDingdan'
import JujueTuihuoDingdan from '../components/SiyunDingdan/TuihuoDingdan/JujueTuihuoDingdan'
import WanchengTuihuoDingdan from '../components/SiyunDingdan/TuihuoDingdan/WanchengTuihuoDingdan'
import KeFuPage from '../components/KeFu/KeFuPage'
import KeFuRecord from '../components/KeFu/KeFuRecord'
import ShouYe from '@/components/ShouYe.vue'
import AccountInformation from '@/components/AccountInformation.vue'
import SystemInformation from '@/components/SystemInformation.vue'
import CommentList from '@/components/CommentList.vue'
import addCoupon from '../components/coupons/addCoupon.vue'
import coupons from  '../components/coupons/coupons.vue'
import viewUserCoupons from  '../components/coupons/viewUserCoupons.vue'
import viewTheDetails from '../components/coupons/viewTheDetails.vue'
import CarouselMap from '../components/CarouselMap/CarouselMapList.vue'
//配置组件和路由的映射关系
import App from "../App.vue"
import Account from "../views/Account.vue"
import Course from "../course/Course.vue";
import ProductLog from "../views/ProductLog.vue";
import AddCommodity from "../views/AddCommodity.vue";
import CourseAddInsert from "../course/CourseAddInsert.vue";
import CourseLog from "../course/CourseLog.vue";
import ProductAudit from "../productcourse/ProductAudit.vue";
import CourseAudit from "../productcourse/CourseAudit.vue";
import User from "../user/User";
import Logs from "../signlogs/Logs";
import Juris from "../jurisdiction/Juris";
import Teacher from "../instructor/Teacher";
import Backuser from "../backgroundusers/Backuser";
import Binstuct from "../noinstuctor/Binstuct";

Vue.use(VueRouter)

const routes = [
    {path: '/ShopDingdan', component: ShopDingdan},
    {path:'/CkDingdan', component: CkDingdan, props:true,},
    {path:'/XgDingdan', component: XgDingdan},
    {path:'/GzShopDingdan', component: GzDingdan},
    {path:'/Dfukuan', component: Dfukuan},
    {path:'/Dfahuo', component: Dfahuo},
    {path:'/Yfahuo', component: Yfahuo},
    {path:'/Yquxiao', component: Yquxiao},
    {path:'/Ywancheng', component: Ywancheng},
    {path:'/CourseDingdan', component: CourseDingdan},
    {path:'/CourseDfukuan', component: CourseDfukuan},
    {path:'/CourseYquxiao', component: CourseYquxiao},
    {path:'/CourseYwancheng', component: CourseYwancheng},
    {path:'/TuihuoDingdan', component: TuihuoDingdan},
    {path:'/CkTuihuoDingdan', component: CkTuihuoDingdan},
    {path:'/ZhongTuihuoDingdan', component: ZhongTuihuoDingdan},
    {path:'/DchuliTuihuoDingdan', component: DchuliTuihuoDingdan},
    {path:'/JujueTuihuoDingdan', component: JujueTuihuoDingdan},
    {path:'/WanchengTuihuoDingdan', component: WanchengTuihuoDingdan},
    {path:'/KeFuPage', component: KeFuPage},
    {path:'/KeFuRecord', component: KeFuRecord},
    {
        path: "/",
        name: "ShouYe",
        component: ShouYe,
        props:true
    },
    {
        path: "/AccountInformation",
        name: "AccountInformation",
        component: AccountInformation,
        props:true
    },
    {
        path: "/SystemInformation",
        name: "SystemInformation",
        component: SystemInformation,
        props:true
    },
    {
        path: "/CommentList",
        name: "CommentList",
        component: CommentList,
        props:true
    },
    {path:"/coupons",component:coupons},
    {path: "/addCoupon",component:addCoupon},
    {path: "/viewUserCoupons",component:viewUserCoupons},
    {path: "/viewTheDetails",component:viewTheDetails},
    {path: "/CarouselMap",component:CarouselMap},
    {
        //首页
        path:"/",
        name:"App",
        component: () => import("@/App.vue"),
        children:[
            {
                //商品列表
                path:"Account",
                component: () => import("@/views/Account.vue"),
            },
            {
                //商品日志
                path:"ProductLog",
                component: () => import("@/views/ProductLog.vue"),
            },
            {
                //商品添加
                path:"AddCommodity",
                component: () => import("@/views/AddCommodity.vue"),
            },
            {
                //课程列表
                path:"Course",
                component: () => import("@/course/Course.vue"),
            },
            {
                //课程添加
                path:"CourseAddInsert",
                component: () => import("@/course/CourseAddInsert.vue"),
            },
            {
                //课程日志
                path:"CourseLog",
                component: () => import("@/course/CourseLog.vue"),
            },
            {
                //商品审核
                path:"ProductAudit",
                component:() => import("@/productcourse/ProductAudit.vue")
            },
            {
                //课程审核
                path:"CourseAudit",
                component:() => import("@/productcourse/CourseAudit.vue")
            },
            {
                path:'/Logs',
                component:Logs
            },
            {
                path:'/User',
                component:User
            },
            {
                path:'/Juris',
                component:Juris
            },
            {
                path:'/Teacher',
                component:Teacher
            },
            {
                path:'/Backuser',
                component:Backuser
            },
            {
                path:'/Binstuct',
                component:Binstuct
            },
        ]
    },
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router